home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 4 / ETO Development Tools 4.iso / Tools - Objects / Macintosh Programmer’s Workshop / MPW 3.1 / MPW / Interfaces / CIncludes / Types.h < prev    next >
Text File  |  1990-12-13  |  2KB  |  88 lines

  1. /************************************************************
  2.  
  3. Created: Thursday, September 7, 1989 at 8:18 PM
  4.     Types.h
  5.     C Interface to the Macintosh Libraries
  6.  
  7.  
  8.     Copyright Apple Computer, Inc.    1985-1989
  9.     All rights reserved
  10.  
  11. ************************************************************/
  12.  
  13.  
  14. #ifndef __TYPES__
  15. #define __TYPES__
  16.  
  17. #ifndef NULL
  18. #define NULL 0
  19. #endif
  20. #define nil 0
  21. #define noErr 0     /*All is well*/
  22.  
  23. enum {false,true};
  24. typedef unsigned char Boolean;
  25.  
  26. enum {v,h};
  27. typedef unsigned char VHSelect;
  28.  
  29. typedef long (*ProcPtr)();
  30. typedef unsigned char Byte;
  31. typedef char SignedByte;
  32. typedef long Fixed;
  33. typedef long Fract;
  34.  
  35. typedef short OSErr;
  36.  
  37. typedef unsigned long OSType;
  38.  
  39. typedef ProcPtr *ProcHandle;
  40. typedef char *Ptr;
  41. typedef Ptr *Handle;
  42. typedef unsigned long ResType;
  43. typedef unsigned char Str255[256],Str63[64],Str31[32],Str27[28],Str15[16],*StringPtr,**StringHandle;
  44.  
  45. #ifdef __cplusplus
  46. inline int Length(const StringPtr string) { return (*string); };
  47. #else
  48. #define Length(string) (*(unsigned char *)(string))
  49. #endif
  50.  
  51.  
  52. typedef unsigned char Style;
  53.  
  54.  
  55. struct Point {
  56.     short v;
  57.     short h;
  58. };
  59.  
  60. typedef struct Point Point;
  61. struct Rect {
  62.     short top;
  63.     short left;
  64.     short bottom;
  65.     short right;
  66. };
  67.  
  68. typedef struct Rect Rect;
  69. #ifdef __cplusplus
  70. extern "C" {
  71. #endif
  72. pascal void Debugger(void)
  73.     = 0xA9FF;
  74. pascal void DebugStr(StringPtr aStr)
  75.     = 0xABFF;
  76. void debugstr(char *aStr);
  77. pascal void SysBreak(void)
  78.     = {0x303C,0xFE16,0xA9C9};
  79. pascal void SysBreakStr(StringPtr debugStr)
  80.     = {0x303C,0xFE15,0xA9C9};
  81. pascal void SysBreakFunc(StringPtr debugFunc)
  82.     = {0x303C,0xFE14,0xA9C9};
  83. #ifdef __cplusplus
  84. }
  85. #endif
  86.  
  87. #endif
  88.